import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      redirect:'/login'
    },
    {
      path:'/login',
      name:'login',
      component: resolve => require(['../components/pages/login2'],resolve),
    },
    {
      path:'/home',
      component: resolve => require(['../components/common/home'],resolve),
      children:[
        {
          path:'/',
          component: resolve => require(['../components/pages/searchData'],resolve)
        },
        {
          name:'searchData',
          path:'/searchData',
          component: resolve => require(['../components/pages/searchData'],resolve)
        },
        {
          name:'portrait',
          path:'/portrait:mac',
          component: resolve => require(['../components/pages/portrait'],resolve)
        },
        {
          name:'ad',
          path:'/ad',
          component: resolve => require(['../components/pages/adPusher'],resolve)
        },
      ]
    }
  ]
})
